EMI affects an electronic system by electromagnetic induction, electrostatic coupling or conduction. EMI can be problematic in, for example, electronic systems that include several EMI sources integrated within the same housing as a digital magnetic compass. A typical earth magnetic field ranges between 25 μT˜62 μT, depending on the geographical location. To maintain an acceptable heading error (e.g., <10° heading error) for the magnetic compass typically requires EMI to be in the range of 2 μT˜6 μT. In some electronic systems having a small form factor (e.g., a smartphone), a magnetometer sensor package may be located close (e.g., several millimeters) to one or more EMI sources (e.g., a voice coil in a telephone receiver module). The EMI is frequency dependent and can have an amplitude as high as ˜22 μT. This large EMI could result in a large magnetic compass heading error (e.g., up to 90° heading error), impacting the performance of applications, such as gaming and navigation applications, that use multi-axis magnetometers to determine direction or compensate for errors in other sensors (e.g., compensate gyro sensors).